<template>
    <div>
      <!-- 查询条件 -->
      <div class="orderactivity-header">
        <div class="assign-header">
          <div>老人日常状况记录列表</div>
          <i class="el-icon-close" style="font-size: 20px; color: #72767b;cursor: pointer;" @click="close"></i>
        </div>
      </div>
       <el-divider></el-divider>
      <!-- Table组件 -->
       <div class="contacts-content">
        <main-table :columns="columns" :data="list" :isPaginationShow="false" wrapperHeight="100%" height="calc(100% - 20px)">
        </main-table>
      </div>
    </div>
</template>

<script>
import { sex, age, elderlyCategory, sourceType, unixToDate } from "@/utils";
import mainTable from "@/components/main-table/index";
// import * as APICensus from '@/api/census'
export default {
  name: 'healthy-list',
  props: {
    list: {
      type: Array,
      default: () => []
    }
  },
  components: {
    mainTable
  },
  data () {
    return {
      columns: [
        {
          index: true
        },
        {
          prop: 'name',
          label: '老人姓名'
        },
        {
          prop: 'tiwen',
          label: '当日身体状况'
        },
        {
          prop: 'fuyao',
          label: '当日服药情况'
        },
        {
          prop: 'yinshi',
          label: '当日饮食情况'
        },
        {
          prop: 'jibin',
          label: '当日疾病情况'
        },
        {
          prop: 'start_time',
          label: '签到时间',
          width:200,
          formatter (row, column, cellValue) {
            return unixToDate(cellValue)
          }
        },
        {
          prop: 'end_time',
          label: '签退时间',
          width:200,
          formatter (row, column, cellValue) {
            return unixToDate(cellValue)
          }
        },
        {
          prop: 'admin_name',
          label: '工作人员'
        }
      ]
    }
  },
  methods: {
    close () {
      this.$emit('close')
    }
  }
}
</script>

<style lang="scss" scoped>
  .assign-header {
    display: flex;
    justify-content: space-between;
    cursor: pointer;
  }
  .orderactivity-header{
     padding: 20px;
     padding-bottom: 0px;
  }
  .contacts-content {
   padding: 0 20px;
   padding-bottom: 7px;
  }
</style>
